{% extends "admin/base_site.html" %}
{% load i18n %}
{% load adminmedia %}

{% block extrahead %}
{{ block.super }}
{% ifequal query.pop 'pop=1' %} <!-- FileBrowseField -->
<script language="javascript" type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}js/FB_FileBrowseField.js"></script>
{% endifequal %}
{% ifequal query.pop 'pop=2' %} <!-- TinyMCE -->
<script language="javascript" type="text/javascript" src="{{ settings_var.URL_TINYMCE }}tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}js/FB_TinyMCE.js"></script>
{% endifequal %}
<script language="javascript" type="text/javascript" src="{% admin_media_prefix %}js/core.js"></script>
<script language="javascript" type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}js/FB_MakeThumbs.js"></script>
{% endblock %}
{% block coltype %}flex{% endblock %}
{% block bodyclass %}change-list filebrowser{% endblock %}
{% block extrastyle %}
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />
<link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
{% if query.pop %}
<style type="text/css">
#header { display: none; }
</style>
{% endif %}
{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs">{{ breadcrumbs }}</div>{% endblock %}

{% block content %}
<div id="content-main">
    <ul class="object-tools">
        <li><a href="mkdir/{{ query.query_str_total }}">{% trans "Make Directory" %}</a></li>
        <li><a href="makethumbs/{{ query.query_str_total }}">{% trans "Make Thumbs" %}</a></li>
        {% comment %}<!--
        {% if settings_var.USE_IMAGE_GENERATOR and results_var.imagegenerator_total %}<li><a href="generateimages/{{ query.query_str_total }}" class="fb_imagegeneratorlink">{% trans "Generate Images" %}</a></li>{% endif %}
        -->{% endcomment %}
        <li><a href="upload/{{ query.query_str_total }}" class="focus">{% trans "Multiple Upload" %}</a></li>
    </ul>
    <div class="module filtered" id="changelist">
        {% include "filebrowser/include/toolbar.html" %}
        {% include "filebrowser/include/filter.html" %}
        <div id="toolbartable">
        <table cellspacing="0">
            {% if results_var.results_current %}
                {% include "filebrowser/include/tableheader.html" %}
            {% endif %}
            <tbody>
            {% for file in file_list %}
                {% include "filebrowser/include/filelisting.html" %}
            {% endfor %}
            </tbody>
        </table>
        </div>
        {% include "filebrowser/include/paginator.html" %}
    </div>
</div>
{% endblock %}
